package com.llkj.qingnianguoxue.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.bean.CommentListBean;
import com.llkj.qingnianguoxue.util.ImageLoadingUtil;

import java.util.List;

/**
 * 视频详情——评论
 */
public class VideoDetailCommentAdapter extends BaseQuickAdapter<CommentListBean.CommentBean, BaseViewHolder> {

    public VideoDetailCommentAdapter(int layoutResId, List<CommentListBean.CommentBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, CommentListBean.CommentBean item) {
        ImageLoadingUtil.loadingImg((ImageView) baseViewHolder.getView(R.id.iv_head), item.getUserpic(),0);
        baseViewHolder.setText(R.id.tv_name, item.getUsername());
        baseViewHolder.setText(R.id.tv_date, item.getAddtime());
        baseViewHolder.setText(R.id.tv_introduction, item.getContent());
    }

}
